package com.zretc.service.impl;

import java.util.List;

import com.zretc.dao.PlayListDao;
import com.zretc.dao.impl.PlayListDaoImpl;
import com.zretc.entity.PlayList;
import com.zretc.entity.Song;
import com.zretc.service.PlayListService;

import sun.net.www.content.text.plain;

public class PlayListServiceImpl implements PlayListService {
	private PlayListDao playListDao = new PlayListDaoImpl();

	@Override
	public List<Song> getPlayListByAccountId(String accountId) {
		
		return playListDao.findPlaySongByAccountId(accountId);
	}

	@Override
	public Song getSongBySongName(String songName) {
		return playListDao.findSongBySongName(songName);
	}

	@Override
	public int deletePlaySong(Integer songId, Integer accountId) {
		
		return playListDao.deletePlaySong(songId, accountId);
	}

	@Override
	public PlayList getPlayBySongIdAndAccountId(Integer songId, Integer accountId) {
		return playListDao.findBySongIdAndAccountId(songId, accountId);
	}

	@Override
	public int addPlayBySongIdAndAccountId(Integer songId, Integer accountId) {
		return playListDao.insertPlayBySongIdAndAccountId(songId, accountId);
	}

}
